home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / biz / dopus / parent.lha / Parent / Install next >
Text File  |  2002-10-17  |  4KB  |  189 lines

  1. ; Install script for Various DOpus5 modules
  2. ; $VER: Module_Install 1.0 (17.10.2002) ©2002 Robin Cloutman <rycochet@rycochet.demon.co.uk>
  3.  
  4. (set @default-dest "DOpus5:")
  5.  
  6. ;---------------------------------------------------------------------------
  7. ;(if (= @language "english)
  8. ;(
  9.     (set #setup-text "Checking system and application...")
  10.  
  11.     (set #msg-abort
  12.     (cat "ERROR - Cannot find required files for installation!!!\n\n"
  13.          "Please ensure you extracted the archive\n"
  14.          "correctly!"
  15.     ))
  16.  
  17.     (set #msg-cpu
  18.     (cat "Which version of " @app-name " do you wish to install?"
  19.     ))
  20.     (set #msg-cpu-help
  21.     (cat "Unless you have some reason to choose a different version, best leave\n"
  22.          "this to the default version.\n\n"
  23.          "(The 68000 version is safe for all cpu's)"
  24.     ))
  25.  
  26.     (set #msg-dest
  27.     (cat "Where is DOpus5 Installed?\n"
  28.          "(" @app-name " is installed relative to this)"
  29.     ))
  30.     (set #msg-dest-help
  31.     (cat "This should be where DOpus5 itself lives, as there may be may parts for this module.\n\n"
  32.          @askdir-help
  33.     ))
  34.  
  35.     (set #msg-module
  36.     (cat "Installing " @app-name ".module"
  37.     ))
  38.     (set #msg-module-help
  39.     (cat "Just installing the module...\n\n"
  40.          @copylib-help
  41.     ))
  42.  
  43.     (set #msg-readme
  44.     (cat "Installing " @app-name ".readme"
  45.     ))
  46.     (set #msg-readme-help
  47.     (cat "Just installing the readme...\n\n"
  48.          @copyfiles-help
  49.     ))
  50.  
  51.     (set #msg-rexx
  52.     (cat "Installing various ARexx files"
  53.     ))
  54.     (set #msg-rexx-help
  55.     (cat "These files are either required, or examples.\n\n"
  56.          @copyfiles-help
  57.     ))
  58.  
  59.     (set #msg-exit
  60.     (cat "Installation complete\n\n"
  61.          @app-name " has been installed in " @default-dest
  62.     ))
  63.  
  64. ;)
  65.  
  66. ;=============================================================================
  67.  
  68. (procedure p_file arg1 arg2 arg3
  69.     (if (= (exists arg1) true)
  70.         (if (>= arg2 arg3)
  71.             (
  72.                 (set #file arg1)
  73.                 true
  74.             )
  75.             false
  76.         )
  77.         false
  78.     )
  79. )
  80.  
  81. ;=============================================================================
  82.  
  83. (welcome)
  84.  
  85. (complete 0)
  86.  
  87. (working #setup-text)
  88.  
  89. (if (= (exists (cat "Modules/" @app-name ".module")) false)
  90.     (if (= (exists (cat "Modules/" @app-name ".module_020")) false)
  91.         (if (= (exists (cat "Modules/" @app-name ".module_040")) false)
  92.             (if (= (exists (cat "Modules/" @app-name ".module_060")) false)
  93.                 (abort #msg-abort)
  94.             )
  95.         )
  96.     )
  97. )
  98.  
  99. (if (= (database "cpu") "68060")(set #version 4)
  100.     (if (= (database "cpu") "68040")(set #version 3)
  101.         (if (= (database "cpu") "68030")(set #version 2)
  102.             (if (= (database "cpu") "68020")(set #version 1)
  103.                 (set #version 0)
  104.             )
  105.         )
  106.     )
  107. )
  108.  
  109. (complete 25)
  110.  
  111. (if (>= @user-level 1)
  112.     (set @default-dest
  113.         (askdir
  114.             (prompt #msg-dest)
  115.             (help #msg-dest-help)
  116.             (default @default-dest)
  117.         )
  118.     )
  119. )
  120.  
  121. (complete 50)
  122.  
  123. (if (>= @user-level 1)
  124.     (set #version
  125.         (askchoice
  126.             (prompt #msg-cpu)
  127.             (help #msg-cpu-help)
  128.             (choices "68000" "68020" "68030" "68040" "68060")
  129.             (default #version)
  130.         )
  131.     )
  132. )
  133.  
  134. (if (= (p_file (cat "Modules/" @app-name ".module_060") #version 4) false)
  135.     (if (= (p_file (cat "Modules/" @app-name ".module_040") #version 3) false)
  136.         (if (= (p_file (cat "Modules/" @app-name ".module_020") #version 1) false)
  137.             (if (= (set #file (cat "Modules/" @app-name ".module")) false)
  138.                 (abort #msg-abort)
  139.             )
  140.         )
  141.     )
  142. )
  143.  
  144. (set #module-dir (tackon @default-dest "Modules"))
  145. (set #rexx-dir (tackon @default-dest "Rexx"))
  146.  
  147. (complete 75)
  148.  
  149. (copylib
  150.     (prompt #msg-module)
  151.     (help #msg-module-help)
  152.     (source #file)
  153.     (dest #module-dir)
  154.     (newname (cat @app-name ".module"))
  155.     (if (>= @user-level 2)(confirm))
  156.     (optional force)
  157.     (nogauge)
  158. )
  159.  
  160. (if (= (exists (cat @app-name ".readme")) true)
  161.     (copyfiles
  162.         (prompt #msg-readme)
  163.         (help #msg-readme-help)
  164.         (source (cat @app-name ".readme"))
  165.         (dest @default-dest)
  166.         (if (>= @user-level 2)(confirm))
  167.         (optional nofail force)
  168.         (nogauge)
  169.     )
  170. )
  171.  
  172. (if (<> (exists "Rexx") false)
  173.     (foreach "Rexx/" "#?"
  174.         (copylib
  175.             (prompt #msg-rexx)
  176.             (help #msg-rexx-help)
  177.             (source (tackon "Rexx" @each-name))
  178.             (dest #rexx-dir)
  179.             (if (>= @user-level 2)(confirm))
  180.             (optional nofail force)
  181.             (nogauge)
  182.         )
  183.     )
  184. )
  185.  
  186. (complete 100)
  187.  
  188. (exit #msg-exit (quiet))
  189.